feat: drift-check §11 CI-Workflows 大版本指针完整性检测(红队 #6-A,ADR-0016) - #49
Conversation
全部业务仓 gate 引用 CI-Workflows@v1 浮动指针,release-tags ruleset 的 admin bypass 使指针可被强移且此前无任何检测。§11 每日校验不变式 vN==最高 vN.x.y 的 commit(附注 tag 解引用后比对)——强移 24h 内检出。
|
Warning Review limit reached
Next review available in: 24 minutes Limit details: You’ve used all 3 included reviews currently available. Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits within each organization. For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
Comment |
PR Summary by QodoDetect CI-Workflows major-version tag drift
AI Description
Diagram
High-Level Assessment
Files changed (1)
|
Code Review by Qodo
1.
|
回应 qodo 意见(2 条 High 落码,1 条 Medium 凭据项以设计依据回复): 1. Tag 分页假绿(High):matching-refs 此前只读第一页,tag 超过单页后 HIGHEST 计算基于残缺集合。改为 per_page=100 逐页聚合,每页验证为 数组,任一页失败 fail-closed 拒用部分结果;>50 页(5000+ tag)视为 异常同样 fail-closed。 2. 缺失 v1 判正常(High):删除 v1 后旧逻辑输出"无大版本指针(不变式 不适用)"=假绿。v1 是全部业务仓 gate 的供应链入口(REPOS.yaml: "业务仓引用 @v1"),指针缺失必须报漂移。新增 CW_REQUIRED_POINTERS 存在性检查;v2+ 出现后仍由既有循环自动纳入锚点/一致性校验。 3. 凭据项(Medium,不落码):§11 与 §1-§10 共用 GOVERNANCE_TOKEN 是 AGENTS.md 声明的 drift-check 接口("GH_TOKEN=<org admin> bash governance/drift-check.sh");组织级检测本就需要 org 权限,本节 只读公开仓 refs,复用不扩大暴露面;工作流仅 schedule/dispatch 于 可信 main 运行。已在代码注释中固化该威胁模型说明。 验证:对真实 API 全量跑通——"指针 'v1' == v1.2.0(8cccf1b)"+"必需 大版本指针存在(v1)"双双 OK;bash -n 通过。
ADR-0016(决策 3 检测侧;文档侧配套 PR 在 CI-Workflows 仓)
问题(CI-Workflows #6-A,复核属实):全部业务仓 gate 引用
CI-Workflows@v1浮动指针;release-tags ruleset 禁 update/deletion 但 bypass_actors 含 OrganizationAdmin(always)——admin 强移 v1 即改变所有业务仓实际执行的 CI,且此前无任何检测会发现(红队线上实测 v1→8cccf1b 与 v1.2.0 相同,纯靠自觉)。修复:drift-check 新增 §11(每日 03:00 UTC 随 governance-drift 运行):
vN== 最高vN.x.y指向的 commit(v2+ 出现时自动适用)为何不移除 admin bypass:org admin 是灾备最后恢复手段(SECURITY.md 破玻璃语义);正确姿势=保留恢复能力+滥用可检测。
本地实测(真实 org 数据):
OK CI-Workflows 指针 'v1' == v1.2.0(8cccf1b);bash -n通过。存量 2 项 §8 直推漂移与本变更无关(历史事实,每日工作流已在报)。